#include <iostream>
#include <sstream>
#include "String.h"
//
typedef std::basic_istringstream<TCHAR, std::char_traits<TCHAR>, std::allocator<TCHAR> > tistringstream;
//
void split(const tstring& str, std::list<tstring>& lst) {
    tistringstream iss(str);
    lst.clear();
    for(;;) {
        tstring sub;
        iss >> sub;
        if (!iss)
            break;
        lst.push_back(sub);
    }
}
//
void split(const tstring& str, std::vector<tstring>& vec) {
    tistringstream iss(str);
    vec.clear();
    vec.reserve(16);
    for(;;) {
        tstring sub;
        iss >> sub;
        if (!iss)
            break;
        vec.push_back(sub);
    }
}
//
